Embedded interpreters

نویسنده

  • Nick Benton
چکیده

This is a tutorial on using type-indexed embedding/projection pairs when writing interpreters in statically-typed functional languages. The method allows (higher-order) values in the interpreting language to be embedded in the interpreted language and values from the interpreted language may be projected back into the interpreting one. This is particularly useful when adding command-line interfaces or scripting languages to applications written in functional languages. We first describe the basic idea and show how it may be extended to languages with recursive types and applied to elementary meta-programming. We then show how the method combines with Filinski’s continuation-based monadic reflection operations to define an ‘extensional’ version of the call-by-value monadic translation and hence to allow values to be mapped bidirectionally between the levels of an interpreter for a functional language parameterized by an arbitrary monad. Finally, we show how SML functions may be embedded into, and projected from, an interpreter for an asynchronous π-calculus via an ‘extensional’ variant of a standard translation from λ into π.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Security bugs in embedded interpreters Citation

Because embedded interpreters offer flexibility and performance, they are becoming more prevalent, and can be found at nearly every level of the software stack. As one example, the Linux kernel defines languages to describe packet filtering rules and uses embedded interpreters to filter packets at run time. As another example, the RAR archive format allows embedding bytecode in compressed files...

متن کامل

Analyzing Sandboxed Interpreters with Abstract Interpretation

The Android platform provides a coarse-grained per-application permission policy. While this approach works in general, applications that contain multiple subprograms would benefit from more fine-grained permission guarantees. For instance, an advertisementserving GPS app requires both Internet and Location permissions, but provides no guarantee that your location won’t be leaked. Another examp...

متن کامل

Compiling Embedded Languages

Functional languages are particularly well-suited to the implementation of interpreters for domain-specific embedded languages (DSELs). We describe an implemented technique for producing optimizing compilers for DSELs, based on Kamin’s idea of DSELs for program generation. The technique uses a data type of syntax for basic types, a set of smart constructors that perform rewriting over those typ...

متن کامل

Managing Complexity in TeamRooms, a Tcl-Based Internet Groupware Application

This paper describes TeamRooms, a Tcl-based real time groupware application that provides “network places” for users to collaborate. TeamRooms is significantly more complex than previous groupware applications, providing not only generic tools such as shared whiteboards, but also custom groupware applets running within an OpenDoc-style embedded window. As well as describing TeamRooms itself, th...

متن کامل

Effectiveness of Combined Sharing and Freeness Analysis using Abstract Interpretat ion

This paper presents improved unification algorithms, an implementation, and an analysis of the effectiveness of an abstract interpreter based on the sharing + freeness domain presented in a previous paper, which was designed to accurately and concisely represent combined freeness and sharing information for program variables. We first briefly review this domain and the unification algorithms pr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Funct. Program.

دوره 15  شماره 

صفحات  -

تاریخ انتشار 2005